<?php require_once('Connections/sepolwan_connect.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_ambil_berita = "SELECT * FROM artikel ORDER BY id DESC Limit 5";
$ambil_berita = mysql_query($query_ambil_berita, $sepolwan_connect) or die(mysql_error());
$row_ambil_berita = mysql_fetch_assoc($ambil_berita);
$totalRows_ambil_berita = mysql_num_rows($ambil_berita);

mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_home_beritanasional = "SELECT * FROM artikel WHERE jenis = 'Adobe-Photoshop' OR jenis = 'Adobe-Ilustrator' OR jenis = 'CorelDraw' ORDER BY id DESC Limit 4";
$home_beritanasional = mysql_query($query_home_beritanasional, $sepolwan_connect) or die(mysql_error());
$row_home_beritanasional = mysql_fetch_assoc($home_beritanasional);
$totalRows_home_beritanasional = mysql_num_rows($home_beritanasional);

mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_home_beritadpw = "SELECT * FROM artikel WHERE jenis = 'Tutorial-Web-Development' ORDER BY id DESC Limit 4";
$home_beritadpw = mysql_query($query_home_beritadpw, $sepolwan_connect) or die(mysql_error());
$row_home_beritadpw = mysql_fetch_assoc($home_beritadpw);
$totalRows_home_beritadpw = mysql_num_rows($home_beritadpw);

mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_home_beritadpc = "SELECT * FROM artikel WHERE jenis = 'Adobe-Flash' OR jenis = 'SwishMax' ORDER BY id DESC Limit 4";
$home_beritadpc = mysql_query($query_home_beritadpc, $sepolwan_connect) or die(mysql_error());
$row_home_beritadpc = mysql_fetch_assoc($home_beritadpc);
$totalRows_home_beritadpc = mysql_num_rows($home_beritadpc);
?>

<?php if ($row_sesi_member['email']==$_SESSION['MM_Username'] && $_SESSION['MM_Username']<>NULL) { ?>
<br />

<?php include "tambah/post.php" ?><?php } ?>

<p align="center"><?php if ($_GET['page']=='myfollowing') { ?><a href="<?php echo $base ?>"><?php } ?>Timline Public<?php if ($_GET['page']=='myfollowing') { ?></a><?php } ?> | <?php if ($_GET['page']<>'myfollowing') { ?><a href="<?php echo $base ?>halaman/myfollowing.html"><?php }?>Timeline My Following<?php if ($_GET['page']<>'myfollowing') { ?></a><?php }?></p>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top" ><div id="halaman"><div class="jusul">Timeline My Following</div>
      
    </div>
    
      <div id="wrapper">
        <div id="pageData"></div>
        </div></td>
  </tr>
</table><br />

<?php
mysql_free_result($home_beritanasional);
?>
